package designPattern.factory.simplefactory.factory;

import designPattern.factory.simplefactory.pizza.CheesePizza;
import designPattern.factory.simplefactory.pizza.PepperPizza;
import designPattern.factory.simplefactory.pizza.Pizza;

public class SimplePizzaFactory {

    public Pizza createPizza(String type) {
        Pizza pizza = null;
        if (type.equals("cheese")) {
            pizza = new CheesePizza();
        } else if (type.equals("pepper")) {
            pizza = new PepperPizza();
        }
        return pizza;
    }
}
